Unity PlayOneShoot Audio

65

Unity PlayOneShoot Audio -

public class PlayAudio : MonoBehaviour
{
    public AudioSource audioSource;
    public AudioClip clip;
    public float volume=0.5f;

    void Start()
    {
        audioSource.PlayOneShot(clip, volume);
    }
}Copied!

Comments

Submit
0 Comments